<template>
    学习Vue3.0之前需要掌握的知识包括：<br>
   <blogpost v-for="post in posts" :key="post.id" :title="post.title" :id="post.id"></blogpost>
</template>

<script>
import { reactive, toRefs } from 'vue'
import blogpost from './ChildComp'
export default {
    components: {
        blogpost
    },
    setup () {
        const state = reactive({
            posts: [
                { id: 1, title: 'HTML' },
                { id: 2, title: 'CSS' },
                { id: 3, title: 'JavaScript' },
                { id: 4, title: 'jQuery' }
            ]
        })
    
        return {
            ...toRefs(state)
        }
    }
}
</script>

<style lang="scss" scoped>

</style>